﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ApproverList.ascx.cs" Inherits="Lenovo.CFI.Web.VP.ApproverList" %>
<tbwc:StyleSheetControl ID="SscList" runat="server" CssPath="list.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscAc" runat="server" CssPath="VP/autocomplete.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SccDialogs" runat="server" CssPath="modaldialogs.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscLink" runat="server" CssPath="VP/approver/approverlist.css"></tbwc:StyleSheetControl>
<ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" CombineScripts="false" ID="ScriptManager1" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div id="relatedoperation">
            <span class="op">Topic:<asp:DropDownList ID="DdlTopic" runat="server" AutoPostBack="true" 
                Width="16em" onselectedindexchanged="DdlTopic_SelectedIndexChanged"></asp:DropDownList></span>
            <span class="op">Status:<asp:DropDownList ID="DdlStatus" runat="server" AutoPostBack="true"
                Width="16em" onselectedindexchanged="DdlStatus_SelectedIndexChanged">
                <asp:ListItem Text="Approving" Value="12"></asp:ListItem>
                <asp:ListItem Text="Agree" Value="14"></asp:ListItem>
                <asp:ListItem Text="Reject" Value="13"></asp:ListItem>
            </asp:DropDownList></span>
        </div>
        <div class="dataListArea">
            <tbwc:GridViewEx ID="GvList" runat="server" SkinID="List" DataKeyNames="ID" AllowPaging="true" PageSize="20"
                OnRowCommand="GvList_RowCommand" OnRowDataBound="GvList_RowDataBound" 
                onpageindexchanging="GvList_PageIndexChanging">
                <Columns>
                    <asp:TemplateField HeaderText="No.">
                        <itemtemplate><asp:Literal ID="LtrNo" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="listNo" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Name">
                        <itemtemplate><asp:Literal ID="LtrName" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="title" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Type">
                        <itemtemplate><asp:Literal ID="LtrType" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="type" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Owner">
                        <itemtemplate><asp:Literal ID="LtrOwner" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="owner" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText=" ">
                        <ItemTemplate>
                            <asp:ImageButton ID="BtnAgree" runat="server" CausesValidation="False" CommandName="Agree"
                                ToolTip="Agree" CommandArgument='<%# Eval("ID")%>' SkinID="ListAgree" />&nbsp;&nbsp;
                            <asp:ImageButton ID="BtnReject" runat="server" CausesValidation="False" CommandName="Reject"
                                ToolTip="Reject" CommandArgument='<%# Eval("ID")%>' SkinID="ListRefuse" /></ItemTemplate>
                        <ItemStyle CssClass="listOp" />
                    </asp:TemplateField>
                </Columns>
            </tbwc:GridViewEx>
        </div>
        <asp:Button ID="BtnHiddenEdit" runat="Server" Style="display: none" />
        <ajaxToolKit:ModalPopupExtender ID="MpeApprove" runat="server" TargetControlID="BtnHiddenEdit"
            PopupControlID="PnlApprove" CancelControlID="BtnCancel" BackgroundCssClass="modalBackground"
            PopupDragHandleControlID="PnlApproveCaption" Drag="false">
        </ajaxToolKit:ModalPopupExtender>
        <asp:Panel ID="PnlApprove" runat="server" CssClass="modalBox detail" Style="display: none;"
            Width="480px">
            <asp:Panel ID="PnlApproveCaption" runat="server" CssClass="caption" Style="margin-bottom: 10px; cursor: hand;">
                <asp:Literal ID="LtrCaption" runat="server"></asp:Literal></asp:Panel>
            <div><asp:Label ID="LblComment" runat="server" AssociatedControlID="TxtComment" Text="Comment:" CssClass="title"></asp:Label><asp:TextBox 
                ID="TxtComment" runat="server" Width="30em" TextMode="MultiLine" Rows="3"></asp:TextBox></div>
            
            <div style="white-space: nowrap; text-align: center; margin-top:2em;">
		        <asp:Button ID="BtnSave" runat="server" Text="Save" OnClick="BtnSave_Click" CausesValidation="true"/>
		        <asp:Button ID="BtnCancel" runat="server" CausesValidation="false" Text="Cancel"/>
	        </div>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>
